Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

test case for issue 5755

  • Loading branch information...
commit 1869f8665016e0bf9213e6502c49a26193e78c27 1 parent e9d4e2c
Farshid Beheshti authored
3  tests/content/firebug.html
@@ -187,7 +187,8 @@
187 187
     {group: "html",               uri: "html/5255/issue5255.js",                  desc: "Adding elements through Edit HTML shows them in the wrong place", testPage: "html/5255/issue5255.html"},
188 188
     {group: "html",               uri: "html/5448/issue5448.js",                  desc: "normalize() breaks display of text nodes with entities", testPage: "html/5448/issue5448.html"},
189 189
     {group: "html",               uri: "html/5504/issue5504.js",                  desc: "New attributes default to undefined='undefined'", testPage: "html/5504/issue5504.html"},
190  
-    {group: "html",               uri: "html/5506/issue5506.js",                  desc: "Element path doesn't get updated when changing elements in Edit mode", testPage: "html/5506/issue5506.html"},
  190
+    {group: "html",               uri: "html/5506/issue5506.js",                  desc: "Element path doesn't get updated when changing elements in Edit mode", testPage: "html/5506/issue5506.html" },
  191
+    {group: "html",               uri: "html/5755/issue5755.js",                  desc: "Inline editing of cropped attribute values shows the cropped value", testPage: "html/5755/issue5755.html" },
191 192
     {group: "css",                uri: "css/537/issue537.js",                     desc: "Pseudo-elements are not displayed in Style side panel", testPage: "css/537/issue537.html"},
192 193
     {group: "css",                uri: "css/1189/issue1189.js",                   desc: "Display errors of inherited CSS styles in combination with CSS shorthand properties", testPage: "css/1189/issue1189.html"},
193 194
     {group: "css",                uri: "css/1338/issue1338.js",                   desc: "Increment CSS values at least significant digit", testPage: "css/1338/issue1338.html"},
37  tests/content/html/5755/issue5755.html
... ...
@@ -0,0 +1,37 @@
  1
+<!DOCTYPE html>
  2
+<html>
  3
+    <head>
  4
+        <title>Issue 5755: Inline editing of cropped attribute values shows the cropped value</title>
  5
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  6
+        <link href="../../_common/testcase.css" type="text/css" rel="stylesheet"/>
  7
+    </head>
  8
+    <body>
  9
+        <header>
  10
+            <h1><a href="http://code.google.com/p/fbug/issues/detail?id=5755">Issue 5755</a>: Inline editing of cropped attribute values shows the cropped value</h1>
  11
+        </header>
  12
+        <div>
  13
+            <section id="content">
  14
+                <button id= "long-onclick" onclick = "try{if(isButtonLocked(this)){return false;}if (true) { if (checkAddressChanges(document.getElementById('__EShippingPortlet_WAR_EShippingPortlet_INSTANCE_gR6f_:_viewRoot:FORM:CONSIGNEE_ORIGCOUNTRY'), document.getElementById('__EShippingPortlet_WAR_EShippingPortlet_INSTANCE_gR6f_:_viewRoot:FORM:CITYPOST_SUGG_ADDRESS_TMPL_CONSIGNEE_CITYPOSTAL_COUNTRY')) || checkAddressChanges(jQuery('#CONSIGNOR_ORIGCOUNTRY').get(0), document.getElementById('__EShippingPortlet_WAR_EShippingPortlet_INSTANCE_gR6f_:_viewRoot:FORM:ADDRESS_TMPL_CONSIGNOR_COUNTRY_RO'))) {fadeInModalPanel(document.getElementById('__EShippingPortlet_WAR_EShippingPortlet_INSTANCE_gR6f_:_viewRoot:addressChange').component); return false; } else { return validatePresetProductsAndFeatures(); }};A4J.AJAX.Submit('__EShippingPortlet_WAR_EShippingPortlet_INSTANCE_gR6f_:_viewRoot:FORM',event,{'status':'waitStatus','oncomplete':function(request,event,data){if (false) window.scrollTo(0,0);},'similarityGroupingId':'__EShippingPortlet_WAR_EShippingPortlet_INSTANCE_gR6f_:_viewRoot:FORM:ESHIPPINGPORTLET_CHOOSE_ADDRESSES_CONTINUE','parameters':{'__EShippingPortlet_WAR_EShippingPortlet_INSTANCE_gR6f_:_viewRoot:FORM:ESHIPPINGPORTLET_CHOOSE_ADDRESSES_CONTINUE':'__EShippingPortlet_WAR_EShippingPortlet_INSTANCE_gR6f_:_viewRoot:FORM:ESHIPPINGPORTLET_CHOOSE_ADDRESSES_CONTINUE','org.ajax4jsf.portlet.NAMESPACE':'_EShippingPortlet_WAR_EShippingPortlet_INSTANCE_gR6f_','javax.faces.portletbridge.STATE_ID':'88e7e753\x2Db78b\x2D47f5\x2D82cf\x2D2331e7092187:view:_EShippingPortlet_WAR_EShippingPortlet_INSTANCE_gR6f_'} ,'containerId':'__EShippingPortlet_WAR_EShippingPortlet_INSTANCE_gR6f_:_viewRoot','namespace':'_EShippingPortlet_WAR_EShippingPortlet_INSTANCE_gR6f_','actionUrl':'/EShippingPortlet/faces/xhtml/eShippingOrderNewForm.xhtml?javax.portlet.faces.DirectLink=true'} );return false;}catch(ex){alert('In fact, it does not matter how onclick of button works!\nPlease read the instruction on the page to run test');}">A long onclick</button>
  15
+            </section>
  16
+            <section id="description">
  17
+                <h3>Steps to reproduce</h3>
  18
+                <ol>
  19
+                    <li>Open Firebug</li>
  20
+                    <li>Switch to the HTML panel</li>
  21
+                    <li>Make sure that the "Show Full Text" option is unchecked on the Options Menu from HTML panel</li>
  22
+                    <li>
  23
+                        Inspect the button "A long onclick" at the top of the page (#long-onclick)<br/>
  24
+                    </li>
  25
+                    <li>
  26
+                        Click on the value of <code>onclick</code> attribute<br/>
  27
+                    </li>
  28
+                </ol>
  29
+                <h3>Expected result</h3>
  30
+                <ul>
  31
+                    <li>The Inline editor should open and be filled with whole string of onclick value instead of cropped string</li>
  32
+                </ul>
  33
+            </section>
  34
+            <footer>Farshid Beheshti, farshid.beheshti@gmail.com</footer>
  35
+        </div>
  36
+    </body>
  37
+</html>
33  tests/content/html/5755/issue5755.js
... ...
@@ -0,0 +1,33 @@
  1
+function runTest()
  2
+{
  3
+    FBTest.sysout("issue5755.START");
  4
+
  5
+    FBTest.openNewTab(basePath + "html/5755/issue5755.html", function (win)
  6
+    {
  7
+        FBTest.openFirebug();
  8
+        var panel = FBTest.selectPanel("html");
  9
+        if (FBTest.ok(panel, "Firebug must be opened and switched to HTML panel now."))
  10
+        {
  11
+            FBTest.setPref("showFullTextNodes", false);
  12
+            FBTest.selectElementInHtmlPanel("long-onclick", function (nodes)
  13
+            {
  14
+                // getting onclike attribute's value
  15
+                var onclickValue = nodes.getElementsByClassName("nodeValue").item(1);
  16
+                FBTest.synthesizeMouse(onclickValue);
  17
+                var texteditor = panel.panelNode.getElementsByClassName("textEditorInner").item(0);
  18
+                if (FBTest.ok(texteditor, "Editor must be loaded now"))
  19
+                {
  20
+                    if (FBTest.ok(texteditor.value.indexOf("..") < 0,
  21
+                        "Inline editor must be filled with whole string of onclick attribute value"))
  22
+                    {
  23
+                        FBTest.testDone("issue5755.DONE");
  24
+                    }
  25
+                }
  26
+            });
  27
+        }
  28
+        else
  29
+        {
  30
+            FBTest.testDone("issue5755.FAILED.");
  31
+        }
  32
+    });
  33
+}

0 notes on commit 1869f86

Please sign in to comment.
Something went wrong with that request. Please try again.