Drop [TreatNullAs=NullString] for Document.cookie

https://html.spec.whatwg.org/#document

After this change, setting document.cookie to null will stringify to
"null", so it's simply like setting a cookie by that name. This matches
Firefox Nightly and Edge.

BUG=497307

Review URL: https://codereview.chromium.org/1458753003

Cr-Commit-Position: refs/heads/master@{#360567}
diff --git a/third_party/WebKit/LayoutTests/http/tests/cookies/js-set-null-expected.txt b/third_party/WebKit/LayoutTests/http/tests/cookies/js-set-null-expected.txt
new file mode 100644
index 0000000..fc382fb6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/cookies/js-set-null-expected.txt
@@ -0,0 +1,12 @@
+CONSOLE WARNING: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
+Setting document.cookie to null should set a cookie named 'null'
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.cookie is 'null'
+PASS cookie is 'null'.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/http/tests/cookies/js-set-null.html b/third_party/WebKit/LayoutTests/http/tests/cookies/js-set-null.html
new file mode 100644
index 0000000..4216bef
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/cookies/js-set-null.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="resources/cookies-test-style.css">
+<script src="resources/cookies-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description("Setting document.cookie to null should set a cookie named 'null'");
+
+clearAllCookies();
+
+document.cookie = null;
+shouldBe("document.cookie", "'null'");
+testCookies("null");
+
+clearCookies();
+
+successfullyParsed = true;
+</script>
+<script src="resources/cookies-test-post.js"></script>
+</body>
+</html>
diff --git a/third_party/WebKit/Source/core/dom/Document.idl b/third_party/WebKit/Source/core/dom/Document.idl
index 6b2833c..baf586d9 100644
--- a/third_party/WebKit/Source/core/dom/Document.idl
+++ b/third_party/WebKit/Source/core/dom/Document.idl
@@ -91,8 +91,7 @@
     [PutForwards=href, Unforgeable] readonly attribute Location? location;
     [RaisesException=Setter] attribute DOMString domain;
     readonly attribute DOMString referrer;
-    // FIXME: cookie should not have [TreatNullAs=NullString].
-    [TreatNullAs=NullString, RaisesException] attribute DOMString cookie;
+    [RaisesException] attribute DOMString cookie;
     readonly attribute DOMString lastModified;
     readonly attribute DocumentReadyState readyState;