| 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 <memory> | 5 #include <memory> | 
| 6 | 6 | 
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" | 
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" | 
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" | 
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" | 
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 129   // Both iframes (from allowed host iframe1.com as well as from blocked host | 129   // Both iframes (from allowed host iframe1.com as well as from blocked host | 
| 130   // iframe2.com) should be loaded normally, since we don't filter iframes | 130   // iframe2.com) should be loaded normally, since we don't filter iframes | 
| 131   // (yet) - see crbug.com/651115. | 131   // (yet) - see crbug.com/651115. | 
| 132   bool loaded1 = false; | 132   bool loaded1 = false; | 
| 133   ASSERT_TRUE(content::ExecuteScriptAndExtractBool(tab, "loaded1()", &loaded1)); | 133   ASSERT_TRUE(content::ExecuteScriptAndExtractBool(tab, "loaded1()", &loaded1)); | 
| 134   EXPECT_TRUE(loaded1); | 134   EXPECT_TRUE(loaded1); | 
| 135   bool loaded2 = false; | 135   bool loaded2 = false; | 
| 136   ASSERT_TRUE(content::ExecuteScriptAndExtractBool(tab, "loaded2()", &loaded2)); | 136   ASSERT_TRUE(content::ExecuteScriptAndExtractBool(tab, "loaded2()", &loaded2)); | 
| 137   EXPECT_TRUE(loaded2); | 137   EXPECT_TRUE(loaded2); | 
| 138 } | 138 } | 
|  | 139 | 
|  | 140 class SupervisedUserNavigationThrottleNotSupervisedTest | 
|  | 141     : public SupervisedUserNavigationThrottleTest { | 
|  | 142  protected: | 
|  | 143   SupervisedUserNavigationThrottleNotSupervisedTest() {} | 
|  | 144   ~SupervisedUserNavigationThrottleNotSupervisedTest() override {} | 
|  | 145 | 
|  | 146  private: | 
|  | 147   // Overridden to do nothing, so that the supervised user ID will be empty. | 
|  | 148   void SetUpCommandLine(base::CommandLine* command_line) override {} | 
|  | 149 }; | 
|  | 150 | 
|  | 151 IN_PROC_BROWSER_TEST_F(SupervisedUserNavigationThrottleNotSupervisedTest, | 
|  | 152                        DontBlock) { | 
|  | 153   BlockHost(kExampleHost); | 
|  | 154 | 
|  | 155   WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); | 
|  | 156 | 
|  | 157   GURL blocked_url = embedded_test_server()->GetURL( | 
|  | 158       kExampleHost, "/supervised_user/simple.html"); | 
|  | 159   ui_test_utils::NavigateToURL(browser(), blocked_url); | 
|  | 160   // Even though the URL is marked as blocked, the load should go through, since | 
|  | 161   // the user isn't supervised. | 
|  | 162   EXPECT_FALSE(tab->ShowingInterstitialPage()); | 
|  | 163 } | 
| OLD | NEW | 
|---|