Index: third_party/WebKit/Source/core/html/HTMLIFrameElementTest.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLIFrameElementTest.cpp b/third_party/WebKit/Source/core/html/HTMLIFrameElementTest.cpp |
index 2651ecb15fc222ea76df288f677cf198de81671c..765ef853669fc0ba9c16f815ff4761dfcf631bec 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLIFrameElementTest.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLIFrameElementTest.cpp |
@@ -9,7 +9,7 @@ |
namespace blink { |
-// Test setting via the Element attribute (HTML codepath). |
+// Test setting permission via the Element attribute (HTML codepath). |
TEST(HTMLIFrameElementTest, SetPermissionsAttribute) { |
Document* document = Document::create(); |
HTMLIFrameElement* iframe = HTMLIFrameElement::create(*document); |
@@ -20,7 +20,7 @@ TEST(HTMLIFrameElementTest, SetPermissionsAttribute) { |
EXPECT_EQ("geolocation notifications", iframe->permissions()->value()); |
} |
-// Test setting via the DOMTokenList (JS codepath). |
+// Test setting permission via the DOMTokenList (JS codepath). |
TEST(HTMLIFrameElementTest, SetPermissionsAttributeJS) { |
Document* document = Document::create(); |
HTMLIFrameElement* iframe = HTMLIFrameElement::create(*document); |
@@ -29,4 +29,24 @@ TEST(HTMLIFrameElementTest, SetPermissionsAttributeJS) { |
EXPECT_EQ("midi", iframe->getAttribute(HTMLNames::permissionsAttr)); |
} |
+// Test setting feature policy via the Element attribute (HTML codepath). |
+TEST(HTMLIFrameElementTest, SetAllowAttribute) { |
+ Document* document = Document::create(); |
+ HTMLIFrameElement* iframe = HTMLIFrameElement::create(*document); |
+ |
+ iframe->setAttribute(HTMLNames::allowAttr, "fullscreen"); |
+ EXPECT_EQ("fullscreen", iframe->allow()->value()); |
+ iframe->setAttribute(HTMLNames::allowAttr, "fullscreen vibrate"); |
+ EXPECT_EQ("fullscreen vibrate", iframe->allow()->value()); |
+} |
+ |
+// Test setting feature policy via the DOMTokenList (JS codepath). |
+TEST(HTMLIFrameElementTest, SetAllowAttributeJS) { |
+ Document* document = Document::create(); |
+ HTMLIFrameElement* iframe = HTMLIFrameElement::create(*document); |
+ |
+ iframe->allow()->setValue("fullscreen"); |
+ EXPECT_EQ("fullscreen", iframe->getAttribute(HTMLNames::allowAttr)); |
+} |
+ |
} // namespace blink |