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 "chrome/browser/ui/toolbar/browser_actions_bar_browsertest.h" | 5 #include "chrome/browser/ui/toolbar/browser_actions_bar_browsertest.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 scoped_refptr<const extensions::Extension> CreateExtension( | 39 scoped_refptr<const extensions::Extension> CreateExtension( |
40 const std::string& name, | 40 const std::string& name, |
41 bool has_browser_action) { | 41 bool has_browser_action) { |
42 extensions::DictionaryBuilder manifest; | 42 extensions::DictionaryBuilder manifest; |
43 manifest.Set("name", name). | 43 manifest.Set("name", name). |
44 Set("description", "an extension"). | 44 Set("description", "an extension"). |
45 Set("manifest_version", 2). | 45 Set("manifest_version", 2). |
46 Set("version", "1.0"); | 46 Set("version", "1.0"); |
47 if (has_browser_action) | 47 if (has_browser_action) |
48 manifest.Set("browser_action", extensions::DictionaryBuilder()); | 48 manifest.Set("browser_action", extensions::DictionaryBuilder().Build()); |
49 return extensions::ExtensionBuilder() | 49 return extensions::ExtensionBuilder() |
50 .SetManifest(std::move(manifest)) | 50 .SetManifest(manifest.Build()) |
51 .SetID(crx_file::id_util::GenerateId(name)) | 51 .SetID(crx_file::id_util::GenerateId(name)) |
52 .Build(); | 52 .Build(); |
53 } | 53 } |
54 | 54 |
55 } // namespace | 55 } // namespace |
56 | 56 |
57 // BrowserActionsBarBrowserTest: | 57 // BrowserActionsBarBrowserTest: |
58 | 58 |
59 BrowserActionsBarBrowserTest::BrowserActionsBarBrowserTest() | 59 BrowserActionsBarBrowserTest::BrowserActionsBarBrowserTest() |
60 : toolbar_model_(nullptr) { | 60 : toolbar_model_(nullptr) { |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 InstallExtensionFromWebstore(path, 1); | 520 InstallExtensionFromWebstore(path, 1); |
521 profile()->GetPrefs()->ClearPref( | 521 profile()->GetPrefs()->ClearPref( |
522 prefs::kToolbarIconSurfacingBubbleAcknowledged); | 522 prefs::kToolbarIconSurfacingBubbleAcknowledged); |
523 } | 523 } |
524 | 524 |
525 IN_PROC_BROWSER_TEST_F(BrowserActionsBarRedesignBrowserTest, | 525 IN_PROC_BROWSER_TEST_F(BrowserActionsBarRedesignBrowserTest, |
526 HighlightsForExtensionIconSurfacingBubble) { | 526 HighlightsForExtensionIconSurfacingBubble) { |
527 // The toolbar should be highlighting for the bubble. | 527 // The toolbar should be highlighting for the bubble. |
528 EXPECT_TRUE(browser_actions_bar()->IsHighlightingForSurfacingBubble()); | 528 EXPECT_TRUE(browser_actions_bar()->IsHighlightingForSurfacingBubble()); |
529 } | 529 } |
OLD | NEW |