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

Unified Diff: content/browser/resource_loading_browsertest.cc

Issue 1392213002: Call setUseMobileViewportStyle before setViewportEnabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/content_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/resource_loading_browsertest.cc
diff --git a/content/browser/resource_loading_browsertest.cc b/content/browser/resource_loading_browsertest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7bad95029844b0f7765bcad5343a8c91446bcebf
--- /dev/null
+++ b/content/browser/resource_loading_browsertest.cc
@@ -0,0 +1,33 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <stdlib.h>
+
+#include "content/public/test/browser_test_utils.h"
+#include "content/public/test/content_browser_test.h"
+#include "content/public/test/content_browser_test_utils.h"
+#include "content/public/test/test_navigation_observer.h"
+#include "content/shell/browser/shell.h"
+
+namespace content {
+
+class ResourceLoadingBrowserTest : public ContentBrowserTest {
+};
+
+const char kResourceLoadingNonMobilePage[] =
+ "files/resource_loading/resource_loading_non_mobile.html";
+IN_PROC_BROWSER_TEST_F(ResourceLoadingBrowserTest,
+ ResourceLoadingAvoidDoubleDownloads) {
+ ASSERT_TRUE(test_server()->Start());
+ GURL url = test_server()->GetURL(kResourceLoadingNonMobilePage);
+ NavigateToURL(shell(), url);
+ content::TestNavigationObserver observer(shell()->web_contents());
bokan 2015/10/16 16:19:55 Why is this needed? It seems unused.
+ int data = -1;
+ EXPECT_TRUE(ExecuteScriptAndExtractInt(shell()->web_contents(),
+ "getResourceNumber()", &data));
+ EXPECT_EQ(1, data);
+}
+
+} // namespace content
+
« no previous file with comments | « no previous file | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698