Reviewed by Darin.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Apr 2006 18:02:19 +0000 (18:02 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Apr 2006 18:02:19 +0000 (18:02 +0000)
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8110
          Define navigator.vendorSub (bcms.gov.uk doesn't allow access to login page)

        Test: fast/dom/navigator-vendorSub.html

        * khtml/ecma/kjs_navigator.cpp:
        (KJS::Navigator::getValueProperty): Return an empty string for vendorSub property.
        * khtml/ecma/kjs_navigator.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13701 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/dom/navigator-vendorSub-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/navigator-vendorSub.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/khtml/ecma/kjs_navigator.cpp
WebCore/khtml/ecma/kjs_navigator.h

index c2d718be21490dc78957683064bba2d899509438..c9e6a64b02b6b5cb1fb58e74f47793bba2518891 100644 (file)
@@ -1,3 +1,13 @@
+2006-04-05  Alexey Proskuryakov  <ap@nypop.com>
+
+        Reviewed by Darin.
+
+        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8110
+          Define navigator.vendorSub (bcms.gov.uk doesn't allow access to login page)
+
+        * fast/dom/navigator-vendorSub-expected.txt: Added.
+        * fast/dom/navigator-vendorSub.html: Added.
+
 2006-04-04  Darin Adler  <darin@apple.com>
 
         Reviewed by Justin and Adele.
diff --git a/LayoutTests/fast/dom/navigator-vendorSub-expected.txt b/LayoutTests/fast/dom/navigator-vendorSub-expected.txt
new file mode 100644 (file)
index 0000000..cd48de6
--- /dev/null
@@ -0,0 +1,3 @@
+Tests for bug 8110: Define navigator.vendorSub (bcms.gov.uk doesn't allow access to login page).
+
+navigator.vendorSub: '' (should not be undefined or null)
diff --git a/LayoutTests/fast/dom/navigator-vendorSub.html b/LayoutTests/fast/dom/navigator-vendorSub.html
new file mode 100644 (file)
index 0000000..86b55a6
--- /dev/null
@@ -0,0 +1,12 @@
+<html>
+<body>
+<p>Tests for <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=8110">bug 8110</a>: 
+Define navigator.vendorSub (bcms.gov.uk doesn't allow access to login page).</p>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+
+    document.write("navigator.vendorSub: '" + navigator.vendorSub + "' (should not be undefined or null)");
+</script>
+</body>
+</html>
index 31ab1f1217ef07dcd9f662c08374b8b0defddd3c..0e93626b8af4157bee4326ec58b17273e92251eb 100644 (file)
@@ -1,3 +1,16 @@
+2006-04-05  Alexey Proskuryakov  <ap@nypop.com>
+
+        Reviewed by Darin.
+
+        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8110
+          Define navigator.vendorSub (bcms.gov.uk doesn't allow access to login page)
+
+        Test: fast/dom/navigator-vendorSub.html
+
+        * khtml/ecma/kjs_navigator.cpp:
+        (KJS::Navigator::getValueProperty): Return an empty string for vendorSub property.
+        * khtml/ecma/kjs_navigator.h:
+
 2006-04-04  Darin Adler  <darin@apple.com>
 
         Reviewed by Justin (editing parts) and Adele (the rest).
index f6036c15ee07e8329c1d5f9291f4d5acf8735114..50d01f4111c290801a65896f158cf66ae293785f 100644 (file)
@@ -135,6 +135,7 @@ const ClassInfo Navigator::info = { "Navigator", 0, &NavigatorTable, 0 };
   product       Navigator::Product      DontDelete|ReadOnly
   productSub    Navigator::ProductSub   DontDelete|ReadOnly
   vendor        Navigator::Vendor       DontDelete|ReadOnly
+  vendorSub     Navigator::VendorSub    DontDelete|ReadOnly
   cookieEnabled Navigator::CookieEnabled DontDelete|ReadOnly
   javaEnabled   Navigator::JavaEnabled  DontDelete|Function 0
 @end
@@ -178,6 +179,8 @@ JSValue *Navigator::getValueProperty(ExecState *exec, int token) const
     return jsString("20030107");
   case Vendor:
     return jsString("Apple Computer, Inc.");
+  case VendorSub:
+    return jsString("");
   case Language:
     return jsString(defaultLanguage());
   case UserAgent:
index 5b51d4f9ef63cc3811df1d47ba52fd9bf66e394f..0f4ca6b9f9c677fbf6da892e7cff92e034252082 100644 (file)
@@ -38,7 +38,7 @@ namespace KJS {
     virtual const ClassInfo* classInfo() const { return &info; }
     static const ClassInfo info;
     enum { AppCodeName, AppName, AppVersion, Language, UserAgent, Platform,
-           _Plugins, _MimeTypes, Product, ProductSub, Vendor, CookieEnabled, JavaEnabled };
+           _Plugins, _MimeTypes, Product, ProductSub, Vendor, VendorSub, CookieEnabled, JavaEnabled };
     WebCore::Frame *frame() const { return m_frame; }
   private:
     WebCore::Frame *m_frame;