| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014, Google Inc. All rights reserved. | 2 * Copyright (c) 2014, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 {"always", kReferrerPolicyAlways, true}, | 433 {"always", kReferrerPolicyAlways, true}, |
| 434 {"default", kReferrerPolicyNoReferrerWhenDowngrade, true}, | 434 {"default", kReferrerPolicyNoReferrerWhenDowngrade, true}, |
| 435 {"never", kReferrerPolicyNever, true}, | 435 {"never", kReferrerPolicyNever, true}, |
| 436 {"no-referrer", kReferrerPolicyNever, false}, | 436 {"no-referrer", kReferrerPolicyNever, false}, |
| 437 {"default", kReferrerPolicyNoReferrerWhenDowngrade, true}, | 437 {"default", kReferrerPolicyNoReferrerWhenDowngrade, true}, |
| 438 {"no-referrer-when-downgrade", kReferrerPolicyNoReferrerWhenDowngrade, | 438 {"no-referrer-when-downgrade", kReferrerPolicyNoReferrerWhenDowngrade, |
| 439 false}, | 439 false}, |
| 440 {"origin", kReferrerPolicyOrigin, false}, | 440 {"origin", kReferrerPolicyOrigin, false}, |
| 441 {"origin-when-crossorigin", kReferrerPolicyOriginWhenCrossOrigin, true}, | 441 {"origin-when-crossorigin", kReferrerPolicyOriginWhenCrossOrigin, true}, |
| 442 {"origin-when-cross-origin", kReferrerPolicyOriginWhenCrossOrigin, false}, | 442 {"origin-when-cross-origin", kReferrerPolicyOriginWhenCrossOrigin, false}, |
| 443 {"same-origin", kReferrerPolicySameOrigin, false}, |
| 444 {"strict-origin", kReferrerPolicyStrictOrigin, false}, |
| 445 {"strict-origin-when-cross-origin", |
| 446 kReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin, false}, |
| 443 {"unsafe-url", kReferrerPolicyAlways}, | 447 {"unsafe-url", kReferrerPolicyAlways}, |
| 444 }; | 448 }; |
| 445 | 449 |
| 446 for (auto test : tests) { | 450 for (auto test : tests) { |
| 447 GetDocument().SetReferrerPolicy(kReferrerPolicyDefault); | 451 GetDocument().SetReferrerPolicy(kReferrerPolicyDefault); |
| 448 if (test.is_legacy) { | 452 if (test.is_legacy) { |
| 449 // Legacy keyword support must be explicitly enabled for the policy to | 453 // Legacy keyword support must be explicitly enabled for the policy to |
| 450 // parse successfully. | 454 // parse successfully. |
| 451 GetDocument().ParseAndSetReferrerPolicy(test.policy); | 455 GetDocument().ParseAndSetReferrerPolicy(test.policy); |
| 452 EXPECT_EQ(kReferrerPolicyDefault, GetDocument().GetReferrerPolicy()); | 456 EXPECT_EQ(kReferrerPolicyDefault, GetDocument().GetReferrerPolicy()); |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 EXPECT_EQ(DocumentLifecycle::kVisualUpdatePending, | 840 EXPECT_EQ(DocumentLifecycle::kVisualUpdatePending, |
| 837 GetDocument().Lifecycle().GetState()); | 841 GetDocument().Lifecycle().GetState()); |
| 838 | 842 |
| 839 GetDocument().EnsurePaintLocationDataValidForNode( | 843 GetDocument().EnsurePaintLocationDataValidForNode( |
| 840 GetDocument().getElementById("stickyChild")); | 844 GetDocument().getElementById("stickyChild")); |
| 841 EXPECT_EQ(DocumentLifecycle::kCompositingInputsClean, | 845 EXPECT_EQ(DocumentLifecycle::kCompositingInputsClean, |
| 842 GetDocument().Lifecycle().GetState()); | 846 GetDocument().Lifecycle().GetState()); |
| 843 } | 847 } |
| 844 | 848 |
| 845 } // namespace blink | 849 } // namespace blink |
| OLD | NEW |