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/page_info/permission_menu_model.h" | 5 #include "chrome/browser/ui/page_info/permission_menu_model.h" |
6 #include "chrome/grit/generated_resources.h" | |
7 #include "chrome/test/base/testing_profile.h" | 6 #include "chrome/test/base/testing_profile.h" |
8 #include "content/public/test/test_browser_thread_bundle.h" | 7 #include "content/public/test/test_browser_thread_bundle.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
11 | 10 |
12 namespace { | 11 namespace { |
13 | 12 |
14 class TestCallback { | 13 class TestCallback { |
15 public: | 14 public: |
16 TestCallback() : current_(-1) {} | 15 TestCallback() : current_(-1) {} |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 permission.is_incognito = false; | 97 permission.is_incognito = false; |
99 PermissionMenuModel model(profile(), GURL("http://www.google.com"), | 98 PermissionMenuModel model(profile(), GURL("http://www.google.com"), |
100 permission, callback.callback()); | 99 permission, callback.callback()); |
101 EXPECT_EQ(2, model.GetItemCount()); | 100 EXPECT_EQ(2, model.GetItemCount()); |
102 | 101 |
103 permission.is_incognito = true; | 102 permission.is_incognito = true; |
104 PermissionMenuModel incognito_model(profile(), GURL("https://www.google.com"), | 103 PermissionMenuModel incognito_model(profile(), GURL("https://www.google.com"), |
105 permission, callback.callback()); | 104 permission, callback.callback()); |
106 EXPECT_EQ(2, incognito_model.GetItemCount()); | 105 EXPECT_EQ(2, incognito_model.GetItemCount()); |
107 } | 106 } |
OLD | NEW |