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

Side by Side Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 2047833002: DevTools: introduce browser domain for basic target discovery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 6 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
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 #include <deque> 6 #include <deque>
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <utility> 10 #include <utility>
(...skipping 3208 matching lines...) Expand 10 before | Expand all | Expand 10 after
3219 DisableJavascriptCalls(); 3219 DisableJavascriptCalls();
3220 WebContents* web_contents = 3220 WebContents* web_contents =
3221 current_browser()->tab_strip_model()->GetActiveWebContents(); 3221 current_browser()->tab_strip_model()->GetActiveWebContents();
3222 scoped_refptr<DevToolsAgentHost> agent( 3222 scoped_refptr<DevToolsAgentHost> agent(
3223 DevToolsAgentHost::GetOrCreateFor(web_contents)); 3223 DevToolsAgentHost::GetOrCreateFor(web_contents));
3224 FakeDevToolsClient client; 3224 FakeDevToolsClient client;
3225 agent->AttachClient(&client); 3225 agent->AttachClient(&client);
3226 const char* url = "/prerender/prerender_page.html"; 3226 const char* url = "/prerender/prerender_page.html";
3227 PrerenderTestURL(url, FINAL_STATUS_DEVTOOLS_ATTACHED, 1); 3227 PrerenderTestURL(url, FINAL_STATUS_DEVTOOLS_ATTACHED, 1);
3228 NavigateToURLWithDisposition(url, CURRENT_TAB, false); 3228 NavigateToURLWithDisposition(url, CURRENT_TAB, false);
3229 agent->DetachClient(); 3229 agent->DetachClient(&client);
3230 } 3230 }
3231 3231
3232 // Validate that the sessionStorage namespace remains the same when swapping 3232 // Validate that the sessionStorage namespace remains the same when swapping
3233 // in a prerendered page. 3233 // in a prerendered page.
3234 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderSessionStorage) { 3234 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderSessionStorage) {
3235 set_loader_path("/prerender/prerender_loader_with_session_storage.html"); 3235 set_loader_path("/prerender/prerender_loader_with_session_storage.html");
3236 PrerenderTestURL(GetCrossDomainTestUrl("prerender/prerender_page.html"), 3236 PrerenderTestURL(GetCrossDomainTestUrl("prerender/prerender_page.html"),
3237 FINAL_STATUS_USED, 1); 3237 FINAL_STATUS_USED, 1);
3238 NavigateToDestURL(); 3238 NavigateToDestURL();
3239 GoBackToPageBeforePrerender(); 3239 GoBackToPageBeforePrerender();
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
3924 browser()->tab_strip_model()->GetActiveWebContents(); 3924 browser()->tab_strip_model()->GetActiveWebContents();
3925 bool display_test_result = false; 3925 bool display_test_result = false;
3926 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents, 3926 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents,
3927 "DidDisplayReallyPass()", 3927 "DidDisplayReallyPass()",
3928 &display_test_result)); 3928 &display_test_result));
3929 ASSERT_TRUE(display_test_result); 3929 ASSERT_TRUE(display_test_result);
3930 } 3930 }
3931 #endif // !defined(DISABLE_NACL) 3931 #endif // !defined(DISABLE_NACL)
3932 3932
3933 } // namespace prerender 3933 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/debugger/debugger_api.cc ('k') | components/devtools_http_handler/devtools_http_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698