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

Side by Side Diff: chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc

Issue 2013573007: Catch CSP violations in InProcessBrowserTest Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: double check test is run Created 4 years, 4 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/api/notifications/notifications_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <string.h> 5 #include <string.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // are enabled when the CSS resource is loaded. This CSS might be bundle with 270 // are enabled when the CSS resource is loaded. This CSS might be bundle with
271 // Chrome or provided by an extension. 271 // Chrome or provided by an extension.
272 IN_PROC_BROWSER_TEST_F(DomDistillerViewerSourceBrowserTest, 272 IN_PROC_BROWSER_TEST_F(DomDistillerViewerSourceBrowserTest,
273 NoWebUIBindingsDisplayCSS) { 273 NoWebUIBindingsDisplayCSS) {
274 expect_distillation_ = false; 274 expect_distillation_ = false;
275 expect_distiller_page_ = false; 275 expect_distiller_page_ = false;
276 // Navigate to a URL which the source should respond to with CSS. 276 // Navigate to a URL which the source should respond to with CSS.
277 std::string url_without_scheme = std::string("://foobar/") + kViewerCssPath; 277 std::string url_without_scheme = std::string("://foobar/") + kViewerCssPath;
278 GURL url(kDomDistillerScheme + url_without_scheme); 278 GURL url(kDomDistillerScheme + url_without_scheme);
279 ViewSingleDistilledPage(url, "text/css"); 279 ViewSingleDistilledPage(url, "text/css");
280 SetExpectCSPErrorMessages(true);
280 } 281 }
281 282
282 283
283 #if defined(OS_LINUX) 284 #if defined(OS_LINUX)
284 // Flaky on Ubuntu-12.04 bots: https://crbug.com/604362 285 // Flaky on Ubuntu-12.04 bots: https://crbug.com/604362
285 #define MAYBE_EmptyURLShouldNotCrash DISABLED_EmptyURLShouldNotCrash 286 #define MAYBE_EmptyURLShouldNotCrash DISABLED_EmptyURLShouldNotCrash
286 #else 287 #else
287 #define MAYBE_EmptyURLShouldNotCrash EmptyURLShouldNotCrash 288 #define MAYBE_EmptyURLShouldNotCrash EmptyURLShouldNotCrash
288 #endif 289 #endif
289 IN_PROC_BROWSER_TEST_F(DomDistillerViewerSourceBrowserTest, 290 IN_PROC_BROWSER_TEST_F(DomDistillerViewerSourceBrowserTest,
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 EXPECT_EQ("dark serif", result); 647 EXPECT_EQ("dark serif", result);
647 EXPECT_EQ(kDarkToolbarThemeColor, contents->GetThemeColor()); 648 EXPECT_EQ(kDarkToolbarThemeColor, contents->GetThemeColor());
648 649
649 EXPECT_TRUE(content::ExecuteScriptAndExtractString( 650 EXPECT_TRUE(content::ExecuteScriptAndExtractString(
650 contents, kGetFontSize, &result)); 651 contents, kGetFontSize, &result));
651 base::StringToDouble(result, &fontSize); 652 base::StringToDouble(result, &fontSize);
652 ASSERT_FLOAT_EQ(kScale, fontSize/oldFontSize); 653 ASSERT_FLOAT_EQ(kScale, fontSize/oldFontSize);
653 } 654 }
654 655
655 } // namespace dom_distiller 656 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/notifications/notifications_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698