Looks like there was a merge conflict inside shindig/trunk/javascript/container/gadgets.css
-Chirag On Wed, Feb 24, 2010 at 4:16 PM, <[email protected]> wrote: > Author: jasvir > Date: Thu Feb 25 00:16:14 2010 > New Revision: 916053 > > URL: http://svn.apache.org/viewvc?rev=916053&view=rev > Log: > * Displays caja errors in list if there was an error > * Displays warnings in a display:none div otherwise > > > Added: > shindig/trunk/java/server/src/test/resources/endtoend/jsonTest.xml > Modified: > shindig/trunk/features/src/main/javascript/features/caja/taming.js > shindig/trunk/features/src/main/javascript/features/core.json/taming.js > shindig/trunk/features/src/main/javascript/features/core.log/taming.js > > shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/CajaContentRewriter.java > > shindig/trunk/java/server/src/test/java/org/apache/shindig/server/endtoend/EndToEndTest.java > shindig/trunk/javascript/container/gadgets.css > shindig/trunk/javascript/samplecontainer/examples/SocialCajaWorld.xml > > Modified: shindig/trunk/features/src/main/javascript/features/caja/taming.js > URL: > http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/caja/taming.js?rev=916053&r1=916052&r2=916053&view=diff > ============================================================================== > --- shindig/trunk/features/src/main/javascript/features/caja/taming.js > (original) > +++ shindig/trunk/features/src/main/javascript/features/caja/taming.js Thu > Feb 25 00:16:14 2010 > @@ -42,10 +42,7 @@ > var fire = function(globalScope) { > for (var tamer in tamings___) { > if (tamings___.hasOwnProperty(tamer)) { > - // This is just tamings___[tamer](globalScope) > - // but in a way that does not leak a potent "this" > - // to the taming functions > - (1, tamings___[tamer])(globalScope); > + tamings___[tamer].call(___.USELESS, globalScope); > } > } > } > > Modified: > shindig/trunk/features/src/main/javascript/features/core.json/taming.js > URL: > http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/core.json/taming.js?rev=916053&r1=916052&r2=916053&view=diff > ============================================================================== > --- shindig/trunk/features/src/main/javascript/features/core.json/taming.js > (original) > +++ shindig/trunk/features/src/main/javascript/features/core.json/taming.js > Thu Feb 25 00:16:14 2010 > @@ -23,8 +23,6 @@ > */ > var tamings___ = tamings___ || []; > tamings___.push(function(imports) { > - caja___.whitelistFuncs([ > - [gadgets.json, 'parse'], > - [gadgets.json, 'stringify'] > - ]); > + ___.tamesTo(gadgets.json.stringify, safeJSON.stringify); > + ___.tamesTo(gadgets.json.parse, safeJSON.parse); > }); > > Modified: > shindig/trunk/features/src/main/javascript/features/core.log/taming.js > URL: > http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/core.log/taming.js?rev=916053&r1=916052&r2=916053&view=diff > ============================================================================== > --- shindig/trunk/features/src/main/javascript/features/core.log/taming.js > (original) > +++ shindig/trunk/features/src/main/javascript/features/core.log/taming.js > Thu Feb 25 00:16:14 2010 > @@ -31,7 +31,6 @@ > [gadgets, 'log'], > [gadgets, 'warn'], > [gadgets, 'error'], > - [gadgets, 'setLogLevel'], > - [gadgets.log, 'logAtLevel'] > + [gadgets, 'setLogLevel'] > ]); > }); > > Modified: > shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/CajaContentRewriter.java > URL: > http://svn.apache.org/viewvc/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/CajaContentRewriter.java?rev=916053&r1=916052&r2=916053&view=diff > ============================================================================== > --- > shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/CajaContentRewriter.java > (original) > +++ > shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/CajaContentRewriter.java > Thu Feb 25 00:16:14 2010 > @@ -35,6 +35,7 @@ > import com.google.caja.reporting.RenderContext; > import com.google.caja.reporting.SimpleMessageQueue; > import com.google.caja.reporting.SnippetProducer; > +import com.google.caja.reporting.HtmlSnippetProducer; > import com.google.caja.util.Pair; > import com.google.common.collect.Maps; > import com.google.inject.Inject; > @@ -143,7 +144,7 @@ > Pair<Node, Element> htmlAndJs = rw.rewriteContent(retrievedUri, root, > cb); > Node html = htmlAndJs.a; > Element script = htmlAndJs.b; > - > + > cajoledOutput = doc.createElement("div"); > cajoledOutput.setAttribute("id", "cajoled-output"); > cajoledOutput.setAttribute("classes", "g___"); > @@ -156,7 +157,6 @@ > Element messagesNode = formatErrors(doc, is, content.getContent(), mq, > /* visible */ false); > cajoledOutput.appendChild(messagesNode); > - > if (cajoledCache != null) { > cajoledCache.addElement(key, cajoledOutput); > } > @@ -168,7 +168,7 @@ > // There were cajoling errors > // Content is only used to produce useful snippets with error messages > createContainerFor(doc, > - formatErrors(doc, is, content.getContent(), mq, false /* visible > */)); > + formatErrors(doc, is, content.getContent(), mq, true /* visible > */)); > logException(e, mq); > safe = true; > } finally { > > Modified: > shindig/trunk/java/server/src/test/java/org/apache/shindig/server/endtoend/EndToEndTest.java > URL: > http://svn.apache.org/viewvc/shindig/trunk/java/server/src/test/java/org/apache/shindig/server/endtoend/EndToEndTest.java?rev=916053&r1=916052&r2=916053&view=diff > ============================================================================== > --- > shindig/trunk/java/server/src/test/java/org/apache/shindig/server/endtoend/EndToEndTest.java > (original) > +++ > shindig/trunk/java/server/src/test/java/org/apache/shindig/server/endtoend/EndToEndTest.java > Thu Feb 25 00:16:14 2010 > @@ -66,6 +66,7 @@ > "fetchPersonTest.xml", > "fetchPeopleTest.xml", > "errorTest.xml", > + "jsonTest.xml", > "cajaTest.xml", > "failCajaTest.xml", > "osapi/personTest.xml", > @@ -108,6 +109,16 @@ > } > > @Test > + public void jsonParse() throws Exception { > + executeAllPageTests("jsonTest"); > + } > + > + �...@test > + public void cajaJsonParse() throws Exception { > + executeAllPageTests("jsonTest", true /* caja */); > + } > + > + �...@test > public void cajaFetchPerson() throws Exception { > executeAllPageTests("fetchPersonTest", true /* caja */); > } > > Added: shindig/trunk/java/server/src/test/resources/endtoend/jsonTest.xml > URL: > http://svn.apache.org/viewvc/shindig/trunk/java/server/src/test/resources/endtoend/jsonTest.xml?rev=916053&view=auto > ============================================================================== > --- shindig/trunk/java/server/src/test/resources/endtoend/jsonTest.xml (added) > +++ shindig/trunk/java/server/src/test/resources/endtoend/jsonTest.xml Thu > Feb 25 00:16:14 2010 > @@ -0,0 +1,41 @@ > +<?xml version="1.0" encoding="UTF-8"?> > +<!-- > + Licensed to the Apache Software Foundation (ASF) under one > + or more contributor license agreements. See the NOTICE file > + distributed with this work for additional information > + regarding copyright ownership. The ASF licenses this file > + to you under the Apache License, Version 2.0 (the > + "License"); you may not use this file except in compliance > + with the License. You may obtain a copy of the License at > + > + http://www.apache.org/licenses/LICENSE-2.0 > + > + Unless required by applicable law or agreed to in writing, > + software distributed under the License is distributed on an > + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY > + KIND, either express or implied. See the License for the > + specific language governing permissions and limitations > + under the License. > +--> > +<Module> > + <ModulePrefs title="EndToEndTest"> > + </ModulePrefs> > + <Content type="html"> > + <![CDATA[ > + <script type="text/javascript" src="/testframework.js"></script> > + <script type="text/javascript"> > + > + var tests = { > + jsonStringifyTest: function() { > + var val = {foo: 1, bar: [0, 1, 2], baz: {key: 'value'}}; > + var str = gadgets.json.stringify(val); > + assertTrue("Serialization missing scalar value", > /"foo":1/.test(str)); > + assertTrue("Serialization missing array value", > /"bar":\[0,1,2\]/.test(str)); > + assertTrue("Serialization missing literal value", > /"baz":\{"key":"value"\}/.test(str)); > + finished(); > + } > + } > + </script> > + ]]> > + </Content> > +</Module> > > Modified: shindig/trunk/javascript/container/gadgets.css > URL: > http://svn.apache.org/viewvc/shindig/trunk/javascript/container/gadgets.css?rev=916053&r1=916052&r2=916053&view=diff > ============================================================================== > --- shindig/trunk/javascript/container/gadgets.css (original) > +++ shindig/trunk/javascript/container/gadgets.css Thu Feb 25 00:16:14 2010 > @@ -59,8 +59,15 @@ > > .gadgets-log-entry { > } > +<<<<<<< .mine > + > +.gadgets-messages { > + > +} > +======= > > // Used to style messages produced during rewriting by CajaContentRewriter > .gadgets-messages { > > } > +>>>>>>> .r916014 > > Modified: > shindig/trunk/javascript/samplecontainer/examples/SocialCajaWorld.xml > URL: > http://svn.apache.org/viewvc/shindig/trunk/javascript/samplecontainer/examples/SocialCajaWorld.xml?rev=916053&r1=916052&r2=916053&view=diff > ============================================================================== > --- shindig/trunk/javascript/samplecontainer/examples/SocialCajaWorld.xml > (original) > +++ shindig/trunk/javascript/samplecontainer/examples/SocialCajaWorld.xml Thu > Feb 25 00:16:14 2010 > @@ -40,8 +40,8 @@ > border: 1px; > padding: 10px 10px; > } > - a.visitattack { display: none; color: #0000ff; } > - a.visitattack:visited { display: none; color: #000000; } > + a.visitattack { color: #0000ff; } > + a.visitattack:visited { color: #000000; } > .name { background:#C3D9FF none repeat scroll 0 0; padding:4px 3px 3px > 4px;} > </style> > <div id="intro"> > > >
