| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 void HasManifestAndWait() { | 79 void HasManifestAndWait() { |
| 80 shell()->web_contents()->HasManifest( | 80 shell()->web_contents()->HasManifest( |
| 81 base::Bind(&ManifestBrowserTest::OnHasManifest, | 81 base::Bind(&ManifestBrowserTest::OnHasManifest, |
| 82 base::Unretained(this))); | 82 base::Unretained(this))); |
| 83 | 83 |
| 84 message_loop_runner_ = new MessageLoopRunner(); | 84 message_loop_runner_ = new MessageLoopRunner(); |
| 85 message_loop_runner_->Run(); | 85 message_loop_runner_->Run(); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void OnGetManifest(const Manifest& manifest) { | 88 void OnGetManifest(const GURL& manifest_url, const Manifest& manifest) { |
| 89 manifest_ = manifest; | 89 manifest_ = manifest; |
| 90 message_loop_runner_->Quit(); | 90 message_loop_runner_->Quit(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void OnHasManifest(bool has_manifest) { | 93 void OnHasManifest(bool has_manifest) { |
| 94 has_manifest_ = has_manifest; | 94 has_manifest_ = has_manifest; |
| 95 message_loop_runner_->Quit(); | 95 message_loop_runner_->Quit(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 const Manifest& manifest() const { | 98 const Manifest& manifest() const { |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 HasManifestAndWait(); | 599 HasManifestAndWait(); |
| 600 EXPECT_TRUE(has_manifest()); | 600 EXPECT_TRUE(has_manifest()); |
| 601 EXPECT_EQ(0u, console_error_count()); | 601 EXPECT_EQ(0u, console_error_count()); |
| 602 | 602 |
| 603 // The custom embedded test server will fill set the name to 'no cookies' if | 603 // The custom embedded test server will fill set the name to 'no cookies' if |
| 604 // it did not find cookies. | 604 // it did not find cookies. |
| 605 EXPECT_TRUE(base::EqualsASCII(manifest().name.string(), "no cookies")); | 605 EXPECT_TRUE(base::EqualsASCII(manifest().name.string(), "no cookies")); |
| 606 } | 606 } |
| 607 | 607 |
| 608 } // namespace content | 608 } // namespace content |
| OLD | NEW |