chromium/third_party/blink/renderer/core/html/forms/file_input_type_test.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/core/html/forms/file_input_type.h"

#include "base/run_loop.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/clipboard/data_object.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h"
#include "third_party/blink/renderer/core/fileapi/file_list.h"
#include "third_party/blink/renderer/core/frame/frame_test_helpers.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/core/html/forms/html_input_element.h"
#include "third_party/blink/renderer/core/html/forms/mock_file_chooser.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/input_type_names.h"
#include "third_party/blink/renderer/core/loader/empty_clients.h"
#include "third_party/blink/renderer/core/page/drag_data.h"
#include "third_party/blink/renderer/core/testing/dummy_page_holder.h"
#include "third_party/blink/renderer/core/testing/null_execution_context.h"
#include "third_party/blink/renderer/core/testing/wait_for_event.h"
#include "third_party/blink/renderer/platform/file_metadata.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/wtf/date_math.h"

namespace blink {

namespace {

class MockEventListener final : public NativeEventListener {};

class WebKitDirectoryChromeClient : public EmptyChromeClient {};

}  // namespace

TEST(FileInputTypeTest, createFileList) {}

TEST(FileInputTypeTest, ignoreDroppedNonNativeFiles) {}

TEST(FileInputTypeTest, setFilesFromPaths) {}

TEST(FileInputTypeTest, DropTouchesNoPopupOpeningObserver) {}

TEST(FileInputTypeTest, BeforePseudoCrash) {}

TEST(FileInputTypeTest, ChangeTypeDuringOpeningFileChooser) {}

// Tests selecting same file twice should fire cancel event second time.
TEST(FileInputTypeTest, SetFilesFireCorrectEventsForSameFile) {}

// Tests selecting same files twice should fire cancel event second time.
TEST(FileInputTypeTest, SetFilesFireCorrectEventsForSameFiles) {}

// Tests selecting different file after first selection should fire change
// event.
TEST(FileInputTypeTest, SetFilesFireCorrectEventsForDifferentFile) {}

// Tests selecting different files after first selection should fire change
// event.
TEST(FileInputTypeTest, SetFilesFireCorrectEventsForDifferentFiles) {}

// Tests clearing selection (click cancel in file chooser) after selection
// should fire change event.
TEST(FileInputTypeTest, SetFilesFireCorrectEventsCancelWithSelection) {}

// Tests clearing selection (click cancel in file chooser) without selection
// should fire cancel event.
TEST(FileInputTypeTest, SetFilesFireCorrectEventsCancelWithoutSelection) {}

}  // namespace blink