| OLD | NEW |
| 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 Loading... |
| 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 SetIgnoreCSPErrorMessages(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 Loading... |
| 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 |
| OLD | NEW |