| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/previews/previews_infobar_tab_helper.h" | 5 #include "chrome/browser/previews/previews_infobar_tab_helper.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 CallDidFinishNavigation(); | 93 CallDidFinishNavigation(); |
| 94 | 94 |
| 95 InfoBarService* infobar_service = | 95 InfoBarService* infobar_service = |
| 96 InfoBarService::FromWebContents(web_contents()); | 96 InfoBarService::FromWebContents(web_contents()); |
| 97 EXPECT_EQ(1U, infobar_service->infobar_count()); | 97 EXPECT_EQ(1U, infobar_service->infobar_count()); |
| 98 EXPECT_TRUE(infobar_tab_helper->displayed_preview_infobar()); | 98 EXPECT_TRUE(infobar_tab_helper->displayed_preview_infobar()); |
| 99 | 99 |
| 100 // Navigate to reset the displayed state. | 100 // Navigate to reset the displayed state. |
| 101 content::WebContentsTester::For(web_contents()) | 101 content::WebContentsTester::For(web_contents()) |
| 102 ->NavigateAndCommit(GURL(kTestUrl)); | 102 ->NavigateAndCommit(GURL(kTestUrl)); |
| 103 |
| 103 EXPECT_FALSE(infobar_tab_helper->displayed_preview_infobar()); | 104 EXPECT_FALSE(infobar_tab_helper->displayed_preview_infobar()); |
| 104 } | 105 } |
| OLD | NEW |