OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <queue> | 5 #include <queue> |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/process/process.h" | 9 #include "base/process/process.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 content::WebContentsDelegate* orig_delegate_; | 346 content::WebContentsDelegate* orig_delegate_; |
347 bool waiting_for_decision_; | 347 bool waiting_for_decision_; |
348 bool expect_allow_; | 348 bool expect_allow_; |
349 bool decision_made_; | 349 bool decision_made_; |
350 bool last_download_allowed_; | 350 bool last_download_allowed_; |
351 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; | 351 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; |
352 | 352 |
353 DISALLOW_COPY_AND_ASSIGN(MockDownloadWebContentsDelegate); | 353 DISALLOW_COPY_AND_ASSIGN(MockDownloadWebContentsDelegate); |
354 }; | 354 }; |
355 | 355 |
| 356 // TODO(wjmaclean): Fix this test class at some point so it can be re-enabled on |
| 357 // the site isolation bots, and then look at re-enabling WebViewFocusTest when |
| 358 // that happens. |
| 359 // https://crbug.com/503751 |
356 class WebViewTest : public extensions::PlatformAppBrowserTest { | 360 class WebViewTest : public extensions::PlatformAppBrowserTest { |
357 protected: | 361 protected: |
358 void SetUp() override { | 362 void SetUp() override { |
359 if (UsesFakeSpeech()) { | 363 if (UsesFakeSpeech()) { |
360 // SpeechRecognition test specific SetUp. | 364 // SpeechRecognition test specific SetUp. |
361 fake_speech_recognition_manager_.reset( | 365 fake_speech_recognition_manager_.reset( |
362 new content::FakeSpeechRecognitionManager()); | 366 new content::FakeSpeechRecognitionManager()); |
363 fake_speech_recognition_manager_->set_should_send_fake_response(true); | 367 fake_speech_recognition_manager_->set_should_send_fake_response(true); |
364 // Inject the fake manager factory so that the test result is returned to | 368 // Inject the fake manager factory so that the test result is returned to |
365 // the web page. | 369 // the web page. |
(...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2397 << message_; | 2401 << message_; |
2398 } | 2402 } |
2399 | 2403 |
2400 // Tests that webviews do get garbage collected. | 2404 // Tests that webviews do get garbage collected. |
2401 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestGarbageCollect) { | 2405 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestGarbageCollect) { |
2402 TestHelper("testGarbageCollect", "web_view/shim", NO_TEST_SERVER); | 2406 TestHelper("testGarbageCollect", "web_view/shim", NO_TEST_SERVER); |
2403 GetGuestViewManager()->WaitForSingleViewGarbageCollected(); | 2407 GetGuestViewManager()->WaitForSingleViewGarbageCollected(); |
2404 } | 2408 } |
2405 | 2409 |
2406 #if defined(USE_AURA) | 2410 #if defined(USE_AURA) |
| 2411 // TODO(wjmaclean): when WebViewTest is re-enabled on the site-isolation |
| 2412 // bots, then re-enable this test class as well. |
| 2413 // https://crbug.com/503751 |
2407 class WebViewFocusTest : public WebViewTest { | 2414 class WebViewFocusTest : public WebViewTest { |
2408 public: | 2415 public: |
2409 ~WebViewFocusTest() override {} | 2416 ~WebViewFocusTest() override {} |
2410 | 2417 |
2411 void SetUpCommandLine(base::CommandLine* command_line) override { | 2418 void SetUpCommandLine(base::CommandLine* command_line) override { |
2412 WebViewTest::SetUpCommandLine(command_line); | 2419 WebViewTest::SetUpCommandLine(command_line); |
2413 | 2420 |
2414 command_line->AppendSwitchASCII(switches::kTouchEvents, | 2421 command_line->AppendSwitchASCII(switches::kTouchEvents, |
2415 switches::kTouchEventsEnabled); | 2422 switches::kTouchEventsEnabled); |
2416 } | 2423 } |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2524 // TODO(wjmaclean): This is fragile ... if anyone alters the location/size | 2531 // TODO(wjmaclean): This is fragile ... if anyone alters the location/size |
2525 // of the webview in accept_touch_events then this may miss its target. | 2532 // of the webview in accept_touch_events then this may miss its target. |
2526 FocusWaiter waiter(aura_webview); | 2533 FocusWaiter waiter(aura_webview); |
2527 content::SimulateTouchPressAt(GetEmbedderWebContents(), gfx::Point(10, 10)); | 2534 content::SimulateTouchPressAt(GetEmbedderWebContents(), gfx::Point(10, 10)); |
2528 | 2535 |
2529 // Wait for the TouchStart to propagate and restore focus. Test times out | 2536 // Wait for the TouchStart to propagate and restore focus. Test times out |
2530 // on failure. | 2537 // on failure. |
2531 waiter.Wait(); | 2538 waiter.Wait(); |
2532 } | 2539 } |
2533 #endif | 2540 #endif |
OLD | NEW |