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

Side by Side Diff: content/browser/resource_loading_browsertest.cc

Issue 2052633002: Extend the ToRenderFrameHost magic to FrameTreeNode* and Shell* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix induced script bug. 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include "content/public/test/browser_test_utils.h" 7 #include "content/public/test/browser_test_utils.h"
8 #include "content/public/test/content_browser_test.h" 8 #include "content/public/test/content_browser_test.h"
9 #include "content/public/test/content_browser_test_utils.h" 9 #include "content/public/test/content_browser_test_utils.h"
10 #include "content/public/test/test_navigation_observer.h" 10 #include "content/public/test/test_navigation_observer.h"
11 #include "content/shell/browser/shell.h" 11 #include "content/shell/browser/shell.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 class ResourceLoadingBrowserTest : public ContentBrowserTest { 15 class ResourceLoadingBrowserTest : public ContentBrowserTest {
16 }; 16 };
17 17
18 const char kResourceLoadingNonMobilePage[] = 18 const char kResourceLoadingNonMobilePage[] =
19 "/resource_loading/resource_loading_non_mobile.html"; 19 "/resource_loading/resource_loading_non_mobile.html";
20 20
21 IN_PROC_BROWSER_TEST_F(ResourceLoadingBrowserTest, 21 IN_PROC_BROWSER_TEST_F(ResourceLoadingBrowserTest,
22 ResourceLoadingAvoidDoubleDownloads) { 22 ResourceLoadingAvoidDoubleDownloads) {
23 ASSERT_TRUE(embedded_test_server()->Start()); 23 ASSERT_TRUE(embedded_test_server()->Start());
24 GURL url = embedded_test_server()->GetURL(kResourceLoadingNonMobilePage); 24 GURL url = embedded_test_server()->GetURL(kResourceLoadingNonMobilePage);
25 NavigateToURL(shell(), url); 25 NavigateToURL(shell(), url);
26 int data = -1; 26 int data = -1;
27 EXPECT_TRUE(ExecuteScriptAndExtractInt(shell()->web_contents(), 27 EXPECT_TRUE(
28 "getResourceNumber()", &data)); 28 ExecuteScriptAndExtractInt(shell(), "getResourceNumber()", &data));
29 EXPECT_EQ(2, data); 29 EXPECT_EQ(2, data);
30 } 30 }
31 31
32 } // namespace content 32 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698