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 #ifndef COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 // Allows layout tests to evaluate scripts in InspectorOverlay page. | 486 // Allows layout tests to evaluate scripts in InspectorOverlay page. |
487 // Script may have an output represented as a string, return values of other | 487 // Script may have an output represented as a string, return values of other |
488 // types would be ignored. | 488 // types would be ignored. |
489 std::string EvaluateInWebInspectorOverlay(const std::string& script); | 489 std::string EvaluateInWebInspectorOverlay(const std::string& script); |
490 | 490 |
491 // Clears all databases. | 491 // Clears all databases. |
492 void ClearAllDatabases(); | 492 void ClearAllDatabases(); |
493 // Sets the default quota for all origins | 493 // Sets the default quota for all origins |
494 void SetDatabaseQuota(int quota); | 494 void SetDatabaseQuota(int quota); |
495 | 495 |
496 // Changes the cookie policy from the default to allow all cookies. | 496 // Sets the cookie policy to: |
497 void SetAlwaysAcceptCookies(bool accept); | 497 // - allow all cookies when |block| is false |
| 498 // - block only third-party cookies when |block| is true |
| 499 void SetBlockThirdPartyCookies(bool block); |
498 | 500 |
499 // Converts a URL starting with file:///tmp/ to the local mapping. | 501 // Converts a URL starting with file:///tmp/ to the local mapping. |
500 std::string PathToLocalResource(const std::string& path); | 502 std::string PathToLocalResource(const std::string& path); |
501 | 503 |
502 // Sets the permission's |name| to |value| for a given {origin, embedder} | 504 // Sets the permission's |name| to |value| for a given {origin, embedder} |
503 // tuple. | 505 // tuple. |
504 void SetPermission(const std::string& name, | 506 void SetPermission(const std::string& name, |
505 const std::string& value, | 507 const std::string& value, |
506 const GURL& origin, | 508 const GURL& origin, |
507 const GURL& embedding_origin); | 509 const GURL& embedding_origin); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 bool is_web_platform_tests_mode_; | 637 bool is_web_platform_tests_mode_; |
636 | 638 |
637 base::WeakPtrFactory<TestRunner> weak_factory_; | 639 base::WeakPtrFactory<TestRunner> weak_factory_; |
638 | 640 |
639 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 641 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
640 }; | 642 }; |
641 | 643 |
642 } // namespace test_runner | 644 } // namespace test_runner |
643 | 645 |
644 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 646 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
OLD | NEW |