| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // The implementation of AddMessageToConsole isn't inlined because it needs | 129 // The implementation of AddMessageToConsole isn't inlined because it needs |
| 130 // to know about |test_|. | 130 // to know about |test_|. |
| 131 bool MockWebContentsDelegate::AddMessageToConsole( | 131 bool MockWebContentsDelegate::AddMessageToConsole( |
| 132 WebContents* source, | 132 WebContents* source, |
| 133 int32_t level, | 133 int32_t level, |
| 134 const base::string16& message, | 134 const base::string16& message, |
| 135 int32_t line_no, | 135 int32_t line_no, |
| 136 const base::string16& source_id) { | 136 const base::string16& source_id) { |
| 137 DCHECK(source == web_contents_); | 137 DCHECK(source == web_contents_); |
| 138 | 138 |
| 139 if (level == logging::LOG_ERROR) | 139 if (level == logging::LOG_ERROR || level == logging::LOG_WARNING) |
| 140 test_->OnReceivedConsoleError(); | 140 test_->OnReceivedConsoleError(); |
| 141 return false; | 141 return false; |
| 142 } | 142 } |
| 143 | 143 |
| 144 // If a page has no manifest, requesting a manifest should return the empty | 144 // If a page has no manifest, requesting a manifest should return the empty |
| 145 // manifest. | 145 // manifest. |
| 146 IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, NoManifest) { | 146 IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, NoManifest) { |
| 147 GURL test_url = GetTestUrl("manifest", "no-manifest.html"); | 147 GURL test_url = GetTestUrl("manifest", "no-manifest.html"); |
| 148 | 148 |
| 149 TestNavigationObserver navigation_observer(shell()->web_contents(), 1); | 149 TestNavigationObserver navigation_observer(shell()->web_contents(), 1); |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 HasManifestAndWait(); | 600 HasManifestAndWait(); |
| 601 EXPECT_TRUE(has_manifest()); | 601 EXPECT_TRUE(has_manifest()); |
| 602 EXPECT_EQ(0u, console_error_count()); | 602 EXPECT_EQ(0u, console_error_count()); |
| 603 | 603 |
| 604 // The custom embedded test server will fill set the name to 'no cookies' if | 604 // The custom embedded test server will fill set the name to 'no cookies' if |
| 605 // it did not find cookies. | 605 // it did not find cookies. |
| 606 EXPECT_TRUE(base::EqualsASCII(manifest().name.string(), "no cookies")); | 606 EXPECT_TRUE(base::EqualsASCII(manifest().name.string(), "no cookies")); |
| 607 } | 607 } |
| 608 | 608 |
| 609 } // namespace content | 609 } // namespace content |
| OLD | NEW |