diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/svg/unsafe_svg_attribute_sanitization_test.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/svg/unsafe_svg_attribute_sanitization_test.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/chromium/third_party/blink/renderer/core/svg/unsafe_svg_attribute_sanitization_test.cc b/chromium/third_party/blink/renderer/core/svg/unsafe_svg_attribute_sanitization_test.cc index f34d987083d..826efc707a4 100644 --- a/chromium/third_party/blink/renderer/core/svg/unsafe_svg_attribute_sanitization_test.cc +++ b/chromium/third_party/blink/renderer/core/svg/unsafe_svg_attribute_sanitization_test.cc @@ -273,7 +273,7 @@ TEST( // Element::stripScriptingAttributes, perhaps to strip all // SVG animation attributes. TEST(UnsafeSVGAttributeSanitizationTest, stringsShouldNotSupportAddition) { - auto* document = MakeGarbageCollected<Document>(); + auto* document = Document::CreateForTest(); auto* target = MakeGarbageCollected<SVGAElement>(*document); auto* element = MakeGarbageCollected<SVGAnimateElement>(*document); element->SetTargetElement(target); @@ -300,7 +300,7 @@ TEST(UnsafeSVGAttributeSanitizationTest, attributes.push_back(Attribute(svg_names::kFromAttr, "/home")); attributes.push_back(Attribute(svg_names::kToAttr, "javascript:own3d()")); - auto* document = MakeGarbageCollected<Document>(); + auto* document = Document::CreateForTest(); auto* element = MakeGarbageCollected<SVGAnimateElement>(*document); element->StripScriptingAttributes(attributes); @@ -320,7 +320,7 @@ TEST(UnsafeSVGAttributeSanitizationTest, TEST(UnsafeSVGAttributeSanitizationTest, isJavaScriptURLAttribute_hrefContainingJavascriptURL) { Attribute attribute(svg_names::kHrefAttr, "javascript:alert()"); - auto* document = MakeGarbageCollected<Document>(); + auto* document = Document::CreateForTest(); auto* element = MakeGarbageCollected<SVGAElement>(*document); EXPECT_TRUE(element->IsJavaScriptURLAttribute(attribute)) << "The 'a' element should identify an 'href' attribute with a " @@ -330,7 +330,7 @@ TEST(UnsafeSVGAttributeSanitizationTest, TEST(UnsafeSVGAttributeSanitizationTest, isJavaScriptURLAttribute_xlinkHrefContainingJavascriptURL) { Attribute attribute(xlink_names::kHrefAttr, "javascript:alert()"); - auto* document = MakeGarbageCollected<Document>(); + auto* document = Document::CreateForTest(); auto* element = MakeGarbageCollected<SVGAElement>(*document); EXPECT_TRUE(element->IsJavaScriptURLAttribute(attribute)) << "The 'a' element should identify an 'xlink:href' attribute with a " @@ -343,7 +343,7 @@ TEST( QualifiedName href_alternate_prefix("foo", "href", xlink_names::kNamespaceURI); Attribute evil_attribute(href_alternate_prefix, "javascript:alert()"); - auto* document = MakeGarbageCollected<Document>(); + auto* document = Document::CreateForTest(); auto* element = MakeGarbageCollected<SVGAElement>(*document); EXPECT_TRUE(element->IsJavaScriptURLAttribute(evil_attribute)) << "The XLink 'href' attribute with a JavaScript URL value should be " @@ -354,7 +354,7 @@ TEST( TEST(UnsafeSVGAttributeSanitizationTest, isSVGAnimationAttributeSettingJavaScriptURL_fromContainingJavaScriptURL) { Attribute evil_attribute(svg_names::kFromAttr, "javascript:alert()"); - auto* document = MakeGarbageCollected<Document>(); + auto* document = Document::CreateForTest(); auto* element = MakeGarbageCollected<SVGAnimateElement>(*document); EXPECT_TRUE( element->IsSVGAnimationAttributeSettingJavaScriptURL(evil_attribute)) @@ -365,7 +365,7 @@ TEST(UnsafeSVGAttributeSanitizationTest, TEST(UnsafeSVGAttributeSanitizationTest, isSVGAnimationAttributeSettingJavaScriptURL_toContainingJavaScripURL) { Attribute evil_attribute(svg_names::kToAttr, "javascript:window.close()"); - auto* document = MakeGarbageCollected<Document>(); + auto* document = Document::CreateForTest(); auto* element = MakeGarbageCollected<SVGSetElement>(*document); EXPECT_TRUE( element->IsSVGAnimationAttributeSettingJavaScriptURL(evil_attribute)) @@ -377,7 +377,7 @@ TEST( UnsafeSVGAttributeSanitizationTest, isSVGAnimationAttributeSettingJavaScriptURL_valuesContainingJavaScriptURL) { Attribute evil_attribute(svg_names::kValuesAttr, "hi!; javascript:confirm()"); - auto* document = MakeGarbageCollected<Document>(); + auto* document = Document::CreateForTest(); auto* element = MakeGarbageCollected<SVGAnimateElement>(*document); EXPECT_TRUE( element->IsSVGAnimationAttributeSettingJavaScriptURL(evil_attribute)) @@ -388,7 +388,7 @@ TEST( TEST(UnsafeSVGAttributeSanitizationTest, isSVGAnimationAttributeSettingJavaScriptURL_innocuousAnimationAttribute) { Attribute fine_attribute(svg_names::kFromAttr, "hello, world!"); - auto* document = MakeGarbageCollected<Document>(); + auto* document = Document::CreateForTest(); auto* element = MakeGarbageCollected<SVGSetElement>(*document); EXPECT_FALSE( element->IsSVGAnimationAttributeSettingJavaScriptURL(fine_attribute)) |