Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Side by Side Diff: chrome/browser/devtools/devtools_sanity_browsertest.cc

Issue 2901583002: Fold AppModalDialog into its only subclass, JavaScriptAppModalDialog. (Closed)
Patch Set: fix collapse Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/alert_apitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 #include "net/test/spawned_test_server/spawned_test_server.h" 80 #include "net/test/spawned_test_server/spawned_test_server.h"
81 #include "net/test/url_request/url_request_mock_http_job.h" 81 #include "net/test/url_request/url_request_mock_http_job.h"
82 #include "net/url_request/url_request_context.h" 82 #include "net/url_request/url_request_context.h"
83 #include "net/url_request/url_request_filter.h" 83 #include "net/url_request/url_request_filter.h"
84 #include "net/url_request/url_request_http_job.h" 84 #include "net/url_request/url_request_http_job.h"
85 #include "third_party/WebKit/public/platform/WebInputEvent.h" 85 #include "third_party/WebKit/public/platform/WebInputEvent.h"
86 #include "ui/compositor/compositor_switches.h" 86 #include "ui/compositor/compositor_switches.h"
87 #include "ui/gl/gl_switches.h" 87 #include "ui/gl/gl_switches.h"
88 #include "url/gurl.h" 88 #include "url/gurl.h"
89 89
90 using app_modal::AppModalDialog;
91 using app_modal::JavaScriptAppModalDialog; 90 using app_modal::JavaScriptAppModalDialog;
92 using app_modal::NativeAppModalDialog; 91 using app_modal::NativeAppModalDialog;
93 using content::BrowserThread; 92 using content::BrowserThread;
94 using content::DevToolsAgentHost; 93 using content::DevToolsAgentHost;
95 using content::NavigationController; 94 using content::NavigationController;
96 using content::RenderFrameHost; 95 using content::RenderFrameHost;
97 using content::RenderViewHost; 96 using content::RenderViewHost;
98 using content::WebContents; 97 using content::WebContents;
99 using content::WorkerService; 98 using content::WorkerService;
100 using content::WorkerServiceObserver; 99 using content::WorkerServiceObserver;
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 NativeAppModalDialog* native_dialog = GetDialog(); 444 NativeAppModalDialog* native_dialog = GetDialog();
446 native_dialog->AcceptAppModalDialog(); 445 native_dialog->AcceptAppModalDialog();
447 } 446 }
448 447
449 void CancelModalDialog() { 448 void CancelModalDialog() {
450 NativeAppModalDialog* native_dialog = GetDialog(); 449 NativeAppModalDialog* native_dialog = GetDialog();
451 native_dialog->CancelAppModalDialog(); 450 native_dialog->CancelAppModalDialog();
452 } 451 }
453 452
454 NativeAppModalDialog* GetDialog() { 453 NativeAppModalDialog* GetDialog() {
455 AppModalDialog* dialog = ui_test_utils::WaitForAppModalDialog(); 454 JavaScriptAppModalDialog* dialog = ui_test_utils::WaitForAppModalDialog();
456 EXPECT_TRUE(dialog->IsJavaScriptModalDialog()); 455 NativeAppModalDialog* native_dialog = dialog->native_dialog();
457 JavaScriptAppModalDialog* js_dialog =
458 static_cast<JavaScriptAppModalDialog*>(dialog);
459 NativeAppModalDialog* native_dialog = js_dialog->native_dialog();
460 EXPECT_TRUE(native_dialog); 456 EXPECT_TRUE(native_dialog);
461 return native_dialog; 457 return native_dialog;
462 } 458 }
463 }; 459 };
464 460
465 void TimeoutCallback(const std::string& timeout_message) { 461 void TimeoutCallback(const std::string& timeout_message) {
466 ADD_FAILURE() << timeout_message; 462 ADD_FAILURE() << timeout_message;
467 base::MessageLoop::current()->QuitWhenIdle(); 463 base::MessageLoop::current()->QuitWhenIdle();
468 } 464 }
469 465
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
2073 RunTestFunction(window, "testWindowInitializedOnNavigateBack"); 2069 RunTestFunction(window, "testWindowInitializedOnNavigateBack");
2074 2070
2075 DevToolsWindowTesting::CloseDevToolsWindowSync(window); 2071 DevToolsWindowTesting::CloseDevToolsWindowSync(window);
2076 content::WebUIControllerFactory::UnregisterFactoryForTesting(&test_factory); 2072 content::WebUIControllerFactory::UnregisterFactoryForTesting(&test_factory);
2077 } 2073 }
2078 2074
2079 // Tests scripts panel showing. 2075 // Tests scripts panel showing.
2080 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestDevToolsSharedWorker) { 2076 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestDevToolsSharedWorker) {
2081 RunTest("testDevToolsSharedWorker", url::kAboutBlankURL); 2077 RunTest("testDevToolsSharedWorker", url::kAboutBlankURL);
2082 } 2078 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/alert_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698