| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stddef.h> |
| 6 |
| 5 #include "chrome/browser/content_settings/cookie_settings_factory.h" | 7 #include "chrome/browser/content_settings/cookie_settings_factory.h" |
| 6 #include "chrome/browser/infobars/infobar_service.h" | 8 #include "chrome/browser/infobars/infobar_service.h" |
| 7 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 9 #include "chrome/browser/ui/views/collected_cookies_views.h" | 11 #include "chrome/browser/ui/views/collected_cookies_views.h" |
| 10 #include "chrome/test/base/in_process_browser_test.h" | 12 #include "chrome/test/base/in_process_browser_test.h" |
| 11 #include "chrome/test/base/ui_test_utils.h" | 13 #include "chrome/test/base/ui_test_utils.h" |
| 12 #include "components/content_settings/core/browser/cookie_settings.h" | 14 #include "components/content_settings/core/browser/cookie_settings.h" |
| 13 #include "net/test/embedded_test_server/embedded_test_server.h" | 15 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 14 | 16 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // Test closing tab after changing dialog data. Changed dialog should not | 79 // Test closing tab after changing dialog data. Changed dialog should not |
| 78 // show infobar or crash because InfoBarService is gone. | 80 // show infobar or crash because InfoBarService is gone. |
| 79 | 81 |
| 80 SetDialogChanged(); | 82 SetDialogChanged(); |
| 81 | 83 |
| 82 // Closing the owning tab will close dialog. | 84 // Closing the owning tab will close dialog. |
| 83 browser()->tab_strip_model()->GetActiveWebContents()->Close(); | 85 browser()->tab_strip_model()->GetActiveWebContents()->Close(); |
| 84 | 86 |
| 85 EXPECT_EQ(0u, infobar_count()); | 87 EXPECT_EQ(0u, infobar_count()); |
| 86 } | 88 } |
| OLD | NEW |